import urllib.request

# 定义一个url
url = 'http://www.baidu.com'

# 模拟浏览器向服务器获取请求
response =  urllib.request.urlopen(url)

content =  response.read().decode('utf-8')

print(content)


